package logmanager.view_connection;
import java.awt.Color;
import java.util.ArrayList;

import javax.swing.JPanel;

//classe noircissant un ensemble de paneau
public class DarkenPane extends Thread{
	public ArrayList<JPanel> pane;
	
	public DarkenPane(ArrayList<JPanel> pane) {
		super();
		this.pane = pane;
	}
	
	@Override
	public void run() {
		Color c;
		for(int i=240; i>170; i--){
			c = new Color(i, i, i);
			try {
				Thread.sleep(10);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			for (int j = 0; j < pane.size(); j++) {
				pane.get(j).setBackground(c);
				pane.get(j).repaint();
			}	
		}
	}
	
}
